n = input()
m = input()
k = ""
for i in range(min(len(n), len(m))):
    if n[i] == m[i]:
        k += n[i]
    else:
        break
print('<' + k + '>')
